#ifndef __clib_assert_h__
#define __clib_assert_h__

#include <stdio.h>
#include <signal.h>

#define SIGASSERT       34

#ifdef DEBUG

#define assert( _exp )                              \
    if( !(_exp) )                                   \
    {                                               \
        printf( "assert (%s) failed\n", #_exp );    \
        raise(SIGASSERT);                           \
    }

#else

#define assert( _exp )                              \
    if( !(_exp) )                                   \
    {                                               \
        printf( "assert (%s) failed\n", #_exp );    \
    }


#endif // DEBUG

#endif // __clib_assert_h__
